package androidx.preference;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.AbsSavedState;
import android.view.ContextMenu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.preference.j;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

public class Preference implements Comparable<Preference> {
    private boolean A;
    private boolean B;
    private boolean C;
    private boolean D;
    private boolean E;
    private boolean F;
    private boolean G;
    private int H;
    private int I;
    private c J;
    private List<Preference> K;
    private PreferenceGroup L;
    private boolean M;
    private f N;
    private g O;
    private final View.OnClickListener P;

    /* renamed from: b  reason: collision with root package name */
    private Context f782b;

    /* renamed from: c  reason: collision with root package name */
    private j f783c;

    /* renamed from: d  reason: collision with root package name */
    private e f784d;
    private long e;
    private boolean f;
    private d g;
    private e h;
    private int i;
    private int j;
    private CharSequence k;
    private CharSequence l;
    private int m;
    private Drawable n;
    private String o;
    private Intent p;
    private String q;
    private Bundle r;
    private boolean s;
    private boolean t;
    private boolean u;
    private String v;
    private Object w;
    private boolean x;
    private boolean y;
    private boolean z;

    class a implements View.OnClickListener {
        a() {
        }

        public void onClick(View view) {
            Preference.this.c0(view);
        }
    }

    public static class b extends AbsSavedState {
        public static final Parcelable.Creator<b> CREATOR = new a();

        static class a implements Parcelable.Creator<b> {
            a() {
            }

            /* renamed from: a */
            public b createFromParcel(Parcel parcel) {
                return new b(parcel);
            }

            /* renamed from: b */
            public b[] newArray(int i) {
                return new b[i];
            }
        }

        public b(Parcel parcel) {
            super(parcel);
        }

        public b(Parcelable parcelable) {
            super(parcelable);
        }
    }

    interface c {
        void a(Preference preference);

        void b(Preference preference);
    }

    public interface d {
        boolean a(Preference preference, Object obj);
    }

    public interface e {
        boolean onPreferenceClick(Preference preference);
    }

    private static class f implements View.OnCreateContextMenuListener, MenuItem.OnMenuItemClickListener {

        /* renamed from: b  reason: collision with root package name */
        private final Preference f786b;

        f(Preference preference) {
            this.f786b = preference;
        }

        public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
            CharSequence z = this.f786b.z();
            if (this.f786b.E() && !TextUtils.isEmpty(z)) {
                contextMenu.setHeaderTitle(z);
                contextMenu.add(0, 0, 0, r.copy).setOnMenuItemClickListener(this);
            }
        }

        public boolean onMenuItemClick(MenuItem menuItem) {
            CharSequence z = this.f786b.z();
            ((ClipboardManager) this.f786b.i().getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText("Preference", z));
            Toast.makeText(this.f786b.i(), this.f786b.i().getString(r.preference_copied, new Object[]{z}), 0).show();
            return true;
        }
    }

    public interface g<T extends Preference> {
        CharSequence a(T t);
    }

    public Preference(Context context) {
        this(context, (AttributeSet) null);
    }

    public Preference(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, b.f.d.c.g.a(context, m.preferenceStyle, 16842894));
    }

    public Preference(Context context, AttributeSet attributeSet, int i2) {
        this(context, attributeSet, i2, 0);
    }

    /* JADX WARNING: Removed duplicated region for block: B:9:0x00f1  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public Preference(android.content.Context r5, android.util.AttributeSet r6, int r7, int r8) {
        /*
            r4 = this;
            r4.<init>()
            r0 = 2147483647(0x7fffffff, float:NaN)
            r4.i = r0
            r1 = 0
            r4.j = r1
            r2 = 1
            r4.s = r2
            r4.t = r2
            r4.u = r2
            r4.x = r2
            r4.y = r2
            r4.z = r2
            r4.A = r2
            r4.B = r2
            r4.D = r2
            r4.G = r2
            int r3 = androidx.preference.q.preference
            r4.H = r3
            androidx.preference.Preference$a r3 = new androidx.preference.Preference$a
            r3.<init>()
            r4.P = r3
            r4.f782b = r5
            int[] r3 = androidx.preference.t.Preference
            android.content.res.TypedArray r5 = r5.obtainStyledAttributes(r6, r3, r7, r8)
            int r6 = androidx.preference.t.Preference_icon
            int r7 = androidx.preference.t.Preference_android_icon
            int r6 = b.f.d.c.g.n(r5, r6, r7, r1)
            r4.m = r6
            int r6 = androidx.preference.t.Preference_key
            int r7 = androidx.preference.t.Preference_android_key
            java.lang.String r6 = b.f.d.c.g.o(r5, r6, r7)
            r4.o = r6
            int r6 = androidx.preference.t.Preference_title
            int r7 = androidx.preference.t.Preference_android_title
            java.lang.CharSequence r6 = b.f.d.c.g.p(r5, r6, r7)
            r4.k = r6
            int r6 = androidx.preference.t.Preference_summary
            int r7 = androidx.preference.t.Preference_android_summary
            java.lang.CharSequence r6 = b.f.d.c.g.p(r5, r6, r7)
            r4.l = r6
            int r6 = androidx.preference.t.Preference_order
            int r7 = androidx.preference.t.Preference_android_order
            int r6 = b.f.d.c.g.d(r5, r6, r7, r0)
            r4.i = r6
            int r6 = androidx.preference.t.Preference_fragment
            int r7 = androidx.preference.t.Preference_android_fragment
            java.lang.String r6 = b.f.d.c.g.o(r5, r6, r7)
            r4.q = r6
            int r6 = androidx.preference.t.Preference_layout
            int r7 = androidx.preference.t.Preference_android_layout
            int r8 = androidx.preference.q.preference
            int r6 = b.f.d.c.g.n(r5, r6, r7, r8)
            r4.H = r6
            int r6 = androidx.preference.t.Preference_widgetLayout
            int r7 = androidx.preference.t.Preference_android_widgetLayout
            int r6 = b.f.d.c.g.n(r5, r6, r7, r1)
            r4.I = r6
            int r6 = androidx.preference.t.Preference_enabled
            int r7 = androidx.preference.t.Preference_android_enabled
            boolean r6 = b.f.d.c.g.b(r5, r6, r7, r2)
            r4.s = r6
            int r6 = androidx.preference.t.Preference_selectable
            int r7 = androidx.preference.t.Preference_android_selectable
            boolean r6 = b.f.d.c.g.b(r5, r6, r7, r2)
            r4.t = r6
            int r6 = androidx.preference.t.Preference_persistent
            int r7 = androidx.preference.t.Preference_android_persistent
            boolean r6 = b.f.d.c.g.b(r5, r6, r7, r2)
            r4.u = r6
            int r6 = androidx.preference.t.Preference_dependency
            int r7 = androidx.preference.t.Preference_android_dependency
            java.lang.String r6 = b.f.d.c.g.o(r5, r6, r7)
            r4.v = r6
            int r6 = androidx.preference.t.Preference_allowDividerAbove
            boolean r7 = r4.t
            boolean r6 = b.f.d.c.g.b(r5, r6, r6, r7)
            r4.A = r6
            int r6 = androidx.preference.t.Preference_allowDividerBelow
            boolean r7 = r4.t
            boolean r6 = b.f.d.c.g.b(r5, r6, r6, r7)
            r4.B = r6
            int r6 = androidx.preference.t.Preference_defaultValue
            boolean r6 = r5.hasValue(r6)
            if (r6 == 0) goto L_0x00d2
            int r6 = androidx.preference.t.Preference_defaultValue
        L_0x00cb:
            java.lang.Object r6 = r4.T(r5, r6)
            r4.w = r6
            goto L_0x00dd
        L_0x00d2:
            int r6 = androidx.preference.t.Preference_android_defaultValue
            boolean r6 = r5.hasValue(r6)
            if (r6 == 0) goto L_0x00dd
            int r6 = androidx.preference.t.Preference_android_defaultValue
            goto L_0x00cb
        L_0x00dd:
            int r6 = androidx.preference.t.Preference_shouldDisableView
            int r7 = androidx.preference.t.Preference_android_shouldDisableView
            boolean r6 = b.f.d.c.g.b(r5, r6, r7, r2)
            r4.G = r6
            int r6 = androidx.preference.t.Preference_singleLineTitle
            boolean r6 = r5.hasValue(r6)
            r4.C = r6
            if (r6 == 0) goto L_0x00fb
            int r6 = androidx.preference.t.Preference_singleLineTitle
            int r7 = androidx.preference.t.Preference_android_singleLineTitle
            boolean r6 = b.f.d.c.g.b(r5, r6, r7, r2)
            r4.D = r6
        L_0x00fb:
            int r6 = androidx.preference.t.Preference_iconSpaceReserved
            int r7 = androidx.preference.t.Preference_android_iconSpaceReserved
            boolean r6 = b.f.d.c.g.b(r5, r6, r7, r1)
            r4.E = r6
            int r6 = androidx.preference.t.Preference_isPreferenceVisible
            boolean r6 = b.f.d.c.g.b(r5, r6, r6, r2)
            r4.z = r6
            int r6 = androidx.preference.t.Preference_enableCopying
            boolean r6 = b.f.d.c.g.b(r5, r6, r6, r1)
            r4.F = r6
            r5.recycle()
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.preference.Preference.<init>(android.content.Context, android.util.AttributeSet, int, int):void");
    }

    private void C0(SharedPreferences.Editor editor) {
        if (this.f783c.r()) {
            editor.apply();
        }
    }

    private void D0() {
        Preference h2;
        String str = this.v;
        if (str != null && (h2 = h(str)) != null) {
            h2.E0(this);
        }
    }

    private void E0(Preference preference) {
        List<Preference> list = this.K;
        if (list != null) {
            list.remove(preference);
        }
    }

    private void g() {
        Object obj;
        boolean z2 = true;
        if (w() != null) {
            a0(true, this.w);
            return;
        }
        if (!B0() || !y().contains(this.o)) {
            obj = this.w;
            if (obj != null) {
                z2 = false;
            } else {
                return;
            }
        } else {
            obj = null;
        }
        a0(z2, obj);
    }

    private void h0() {
        if (!TextUtils.isEmpty(this.v)) {
            Preference h2 = h(this.v);
            if (h2 != null) {
                h2.i0(this);
                return;
            }
            throw new IllegalStateException("Dependency \"" + this.v + "\" not found for preference \"" + this.o + "\" (title: \"" + this.k + "\"");
        }
    }

    private void i0(Preference preference) {
        if (this.K == null) {
            this.K = new ArrayList();
        }
        this.K.add(preference);
        preference.R(this, A0());
    }

    private void m0(View view, boolean z2) {
        view.setEnabled(z2);
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) {
                m0(viewGroup.getChildAt(childCount), z2);
            }
        }
    }

    public final g A() {
        return this.O;
    }

    public boolean A0() {
        return !F();
    }

    public CharSequence B() {
        return this.k;
    }

    /* access modifiers changed from: protected */
    public boolean B0() {
        return this.f783c != null && G() && D();
    }

    public final int C() {
        return this.I;
    }

    public boolean D() {
        return !TextUtils.isEmpty(this.o);
    }

    public boolean E() {
        return this.F;
    }

    public boolean F() {
        return this.s && this.x && this.y;
    }

    public boolean G() {
        return this.u;
    }

    public boolean H() {
        return this.t;
    }

    public final boolean I() {
        return this.z;
    }

    /* access modifiers changed from: protected */
    public void J() {
        c cVar = this.J;
        if (cVar != null) {
            cVar.b(this);
        }
    }

    public void K(boolean z2) {
        List<Preference> list = this.K;
        if (list != null) {
            int size = list.size();
            for (int i2 = 0; i2 < size; i2++) {
                list.get(i2).R(this, z2);
            }
        }
    }

    /* access modifiers changed from: protected */
    public void L() {
        c cVar = this.J;
        if (cVar != null) {
            cVar.a(this);
        }
    }

    public void M() {
        h0();
    }

    /* access modifiers changed from: protected */
    public void N(j jVar) {
        this.f783c = jVar;
        if (!this.f) {
            this.e = jVar.d();
        }
        g();
    }

    /* access modifiers changed from: protected */
    public void O(j jVar, long j2) {
        this.e = j2;
        this.f = true;
        try {
            N(jVar);
        } finally {
            this.f = false;
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:23:0x0081  */
    /* JADX WARNING: Removed duplicated region for block: B:43:0x00b9  */
    /* JADX WARNING: Removed duplicated region for block: B:45:0x00c2  */
    /* JADX WARNING: Removed duplicated region for block: B:54:0x00d6  */
    /* JADX WARNING: Removed duplicated region for block: B:55:0x00db  */
    /* JADX WARNING: Removed duplicated region for block: B:62:0x0106  */
    /* JADX WARNING: Removed duplicated region for block: B:63:0x0109  */
    /* JADX WARNING: Removed duplicated region for block: B:9:0x0043  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void P(androidx.preference.l r9) {
        /*
            r8 = this;
            android.view.View r0 = r9.f863a
            android.view.View$OnClickListener r1 = r8.P
            r0.setOnClickListener(r1)
            int r1 = r8.j
            r0.setId(r1)
            r1 = 16908304(0x1020010, float:2.3877274E-38)
            android.view.View r1 = r9.M(r1)
            android.widget.TextView r1 = (android.widget.TextView) r1
            r2 = 0
            r3 = 0
            r4 = 8
            if (r1 == 0) goto L_0x0037
            java.lang.CharSequence r5 = r8.z()
            boolean r6 = android.text.TextUtils.isEmpty(r5)
            if (r6 != 0) goto L_0x0034
            r1.setText(r5)
            r1.setVisibility(r3)
            int r1 = r1.getCurrentTextColor()
            java.lang.Integer r1 = java.lang.Integer.valueOf(r1)
            goto L_0x0038
        L_0x0034:
            r1.setVisibility(r4)
        L_0x0037:
            r1 = r2
        L_0x0038:
            r5 = 16908310(0x1020016, float:2.387729E-38)
            android.view.View r5 = r9.M(r5)
            android.widget.TextView r5 = (android.widget.TextView) r5
            if (r5 == 0) goto L_0x0075
            java.lang.CharSequence r6 = r8.B()
            boolean r7 = android.text.TextUtils.isEmpty(r6)
            if (r7 != 0) goto L_0x0072
            r5.setText(r6)
            r5.setVisibility(r3)
            boolean r6 = r8.C
            if (r6 == 0) goto L_0x005c
            boolean r6 = r8.D
            r5.setSingleLine(r6)
        L_0x005c:
            boolean r6 = r8.H()
            if (r6 != 0) goto L_0x0075
            boolean r6 = r8.F()
            if (r6 == 0) goto L_0x0075
            if (r1 == 0) goto L_0x0075
            int r1 = r1.intValue()
            r5.setTextColor(r1)
            goto L_0x0075
        L_0x0072:
            r5.setVisibility(r4)
        L_0x0075:
            r1 = 16908294(0x1020006, float:2.3877246E-38)
            android.view.View r1 = r9.M(r1)
            android.widget.ImageView r1 = (android.widget.ImageView) r1
            r5 = 4
            if (r1 == 0) goto L_0x00b1
            int r6 = r8.m
            if (r6 != 0) goto L_0x0089
            android.graphics.drawable.Drawable r6 = r8.n
            if (r6 == 0) goto L_0x009e
        L_0x0089:
            android.graphics.drawable.Drawable r6 = r8.n
            if (r6 != 0) goto L_0x0097
            android.content.Context r6 = r8.f782b
            int r7 = r8.m
            android.graphics.drawable.Drawable r6 = b.a.k.a.a.d(r6, r7)
            r8.n = r6
        L_0x0097:
            android.graphics.drawable.Drawable r6 = r8.n
            if (r6 == 0) goto L_0x009e
            r1.setImageDrawable(r6)
        L_0x009e:
            android.graphics.drawable.Drawable r6 = r8.n
            if (r6 == 0) goto L_0x00a6
            r1.setVisibility(r3)
            goto L_0x00b1
        L_0x00a6:
            boolean r6 = r8.E
            if (r6 == 0) goto L_0x00ac
            r6 = 4
            goto L_0x00ae
        L_0x00ac:
            r6 = 8
        L_0x00ae:
            r1.setVisibility(r6)
        L_0x00b1:
            int r1 = androidx.preference.p.icon_frame
            android.view.View r1 = r9.M(r1)
            if (r1 != 0) goto L_0x00c0
            r1 = 16908350(0x102003e, float:2.3877403E-38)
            android.view.View r1 = r9.M(r1)
        L_0x00c0:
            if (r1 == 0) goto L_0x00d2
            android.graphics.drawable.Drawable r6 = r8.n
            if (r6 == 0) goto L_0x00ca
            r1.setVisibility(r3)
            goto L_0x00d2
        L_0x00ca:
            boolean r3 = r8.E
            if (r3 == 0) goto L_0x00cf
            r4 = 4
        L_0x00cf:
            r1.setVisibility(r4)
        L_0x00d2:
            boolean r1 = r8.G
            if (r1 == 0) goto L_0x00db
            boolean r1 = r8.F()
            goto L_0x00dc
        L_0x00db:
            r1 = 1
        L_0x00dc:
            r8.m0(r0, r1)
            boolean r1 = r8.H()
            r0.setFocusable(r1)
            r0.setClickable(r1)
            boolean r3 = r8.A
            r9.P(r3)
            boolean r3 = r8.B
            r9.Q(r3)
            boolean r9 = r8.E()
            if (r9 == 0) goto L_0x0104
            androidx.preference.Preference$f r3 = r8.N
            if (r3 != 0) goto L_0x0104
            androidx.preference.Preference$f r3 = new androidx.preference.Preference$f
            r3.<init>(r8)
            r8.N = r3
        L_0x0104:
            if (r9 == 0) goto L_0x0109
            androidx.preference.Preference$f r3 = r8.N
            goto L_0x010a
        L_0x0109:
            r3 = r2
        L_0x010a:
            r0.setOnCreateContextMenuListener(r3)
            r0.setLongClickable(r9)
            if (r9 == 0) goto L_0x0117
            if (r1 != 0) goto L_0x0117
            b.f.l.s.h0(r0, r2)
        L_0x0117:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.preference.Preference.P(androidx.preference.l):void");
    }

    /* access modifiers changed from: protected */
    public void Q() {
    }

    public void R(Preference preference, boolean z2) {
        if (this.x == z2) {
            this.x = !z2;
            K(A0());
            J();
        }
    }

    public void S() {
        D0();
    }

    /* access modifiers changed from: protected */
    public Object T(TypedArray typedArray, int i2) {
        return null;
    }

    @Deprecated
    public void U(b.f.l.b0.c cVar) {
    }

    public void V(Preference preference, boolean z2) {
        if (this.y == z2) {
            this.y = !z2;
            K(A0());
            J();
        }
    }

    /* access modifiers changed from: protected */
    public void W() {
        D0();
    }

    /* access modifiers changed from: protected */
    public void X(Parcelable parcelable) {
        this.M = true;
        if (parcelable != AbsSavedState.EMPTY_STATE && parcelable != null) {
            throw new IllegalArgumentException("Wrong state class -- expecting Preference State");
        }
    }

    /* access modifiers changed from: protected */
    public Parcelable Y() {
        this.M = true;
        return AbsSavedState.EMPTY_STATE;
    }

    /* access modifiers changed from: protected */
    public void Z(Object obj) {
    }

    /* access modifiers changed from: package-private */
    public void a(PreferenceGroup preferenceGroup) {
        if (preferenceGroup == null || this.L == null) {
            this.L = preferenceGroup;
            return;
        }
        throw new IllegalStateException("This preference already has a parent. You must remove the existing parent before assigning a new one.");
    }

    /* access modifiers changed from: protected */
    @Deprecated
    public void a0(boolean z2, Object obj) {
        Z(obj);
    }

    public boolean b(Object obj) {
        d dVar = this.g;
        return dVar == null || dVar.a(this, obj);
    }

    public void b0() {
        j.c f2;
        if (F() && H()) {
            Q();
            e eVar = this.h;
            if (eVar == null || !eVar.onPreferenceClick(this)) {
                j x2 = x();
                if ((x2 == null || (f2 = x2.f()) == null || !f2.onPreferenceTreeClick(this)) && this.p != null) {
                    i().startActivity(this.p);
                }
            }
        }
    }

    /* access modifiers changed from: package-private */
    public final void c() {
    }

    /* access modifiers changed from: protected */
    public void c0(View view) {
        b0();
    }

    /* renamed from: d */
    public int compareTo(Preference preference) {
        int i2 = this.i;
        int i3 = preference.i;
        if (i2 != i3) {
            return i2 - i3;
        }
        CharSequence charSequence = this.k;
        CharSequence charSequence2 = preference.k;
        if (charSequence == charSequence2) {
            return 0;
        }
        if (charSequence == null) {
            return 1;
        }
        if (charSequence2 == null) {
            return -1;
        }
        return charSequence.toString().compareToIgnoreCase(preference.k.toString());
    }

    /* access modifiers changed from: protected */
    public boolean d0(boolean z2) {
        if (!B0()) {
            return false;
        }
        if (z2 == s(!z2)) {
            return true;
        }
        e w2 = w();
        if (w2 != null) {
            w2.e(this.o, z2);
        } else {
            SharedPreferences.Editor c2 = this.f783c.c();
            c2.putBoolean(this.o, z2);
            C0(c2);
        }
        return true;
    }

    /* access modifiers changed from: package-private */
    public void e(Bundle bundle) {
        Parcelable parcelable;
        if (D() && (parcelable = bundle.getParcelable(this.o)) != null) {
            this.M = false;
            X(parcelable);
            if (!this.M) {
                throw new IllegalStateException("Derived class did not call super.onRestoreInstanceState()");
            }
        }
    }

    /* access modifiers changed from: protected */
    public boolean e0(int i2) {
        if (!B0()) {
            return false;
        }
        if (i2 == t(~i2)) {
            return true;
        }
        e w2 = w();
        if (w2 != null) {
            w2.f(this.o, i2);
        } else {
            SharedPreferences.Editor c2 = this.f783c.c();
            c2.putInt(this.o, i2);
            C0(c2);
        }
        return true;
    }

    /* access modifiers changed from: package-private */
    public void f(Bundle bundle) {
        if (D()) {
            this.M = false;
            Parcelable Y = Y();
            if (!this.M) {
                throw new IllegalStateException("Derived class did not call super.onSaveInstanceState()");
            } else if (Y != null) {
                bundle.putParcelable(this.o, Y);
            }
        }
    }

    /* access modifiers changed from: protected */
    public boolean f0(String str) {
        if (!B0()) {
            return false;
        }
        if (TextUtils.equals(str, u((String) null))) {
            return true;
        }
        e w2 = w();
        if (w2 != null) {
            w2.g(this.o, str);
        } else {
            SharedPreferences.Editor c2 = this.f783c.c();
            c2.putString(this.o, str);
            C0(c2);
        }
        return true;
    }

    public boolean g0(Set<String> set) {
        if (!B0()) {
            return false;
        }
        if (set.equals(v((Set<String>) null))) {
            return true;
        }
        e w2 = w();
        if (w2 != null) {
            w2.h(this.o, set);
        } else {
            SharedPreferences.Editor c2 = this.f783c.c();
            c2.putStringSet(this.o, set);
            C0(c2);
        }
        return true;
    }

    /* access modifiers changed from: protected */
    public <T extends Preference> T h(String str) {
        j jVar = this.f783c;
        if (jVar == null) {
            return null;
        }
        return jVar.a(str);
    }

    public Context i() {
        return this.f782b;
    }

    public Bundle j() {
        if (this.r == null) {
            this.r = new Bundle();
        }
        return this.r;
    }

    public void j0(Bundle bundle) {
        e(bundle);
    }

    /* access modifiers changed from: package-private */
    public StringBuilder k() {
        StringBuilder sb = new StringBuilder();
        CharSequence B2 = B();
        if (!TextUtils.isEmpty(B2)) {
            sb.append(B2);
            sb.append(' ');
        }
        CharSequence z2 = z();
        if (!TextUtils.isEmpty(z2)) {
            sb.append(z2);
            sb.append(' ');
        }
        if (sb.length() > 0) {
            sb.setLength(sb.length() - 1);
        }
        return sb;
    }

    public void k0(Bundle bundle) {
        f(bundle);
    }

    public String l() {
        return this.q;
    }

    public void l0(boolean z2) {
        if (this.s != z2) {
            this.s = z2;
            K(A0());
            J();
        }
    }

    /* access modifiers changed from: package-private */
    public long m() {
        return this.e;
    }

    public Intent n() {
        return this.p;
    }

    public void n0(int i2) {
        o0(b.a.k.a.a.d(this.f782b, i2));
        this.m = i2;
    }

    public String o() {
        return this.o;
    }

    public void o0(Drawable drawable) {
        if (this.n != drawable) {
            this.n = drawable;
            this.m = 0;
            J();
        }
    }

    public final int p() {
        return this.H;
    }

    public void p0(Intent intent) {
        this.p = intent;
    }

    public int q() {
        return this.i;
    }

    public void q0(int i2) {
        this.H = i2;
    }

    public PreferenceGroup r() {
        return this.L;
    }

    /* access modifiers changed from: package-private */
    public final void r0(c cVar) {
        this.J = cVar;
    }

    /* access modifiers changed from: protected */
    public boolean s(boolean z2) {
        if (!B0()) {
            return z2;
        }
        e w2 = w();
        return w2 != null ? w2.a(this.o, z2) : this.f783c.j().getBoolean(this.o, z2);
    }

    public void s0(e eVar) {
        this.h = eVar;
    }

    /* access modifiers changed from: protected */
    public int t(int i2) {
        if (!B0()) {
            return i2;
        }
        e w2 = w();
        return w2 != null ? w2.b(this.o, i2) : this.f783c.j().getInt(this.o, i2);
    }

    public void t0(int i2) {
        if (i2 != this.i) {
            this.i = i2;
            L();
        }
    }

    public String toString() {
        return k().toString();
    }

    /* access modifiers changed from: protected */
    public String u(String str) {
        if (!B0()) {
            return str;
        }
        e w2 = w();
        return w2 != null ? w2.c(this.o, str) : this.f783c.j().getString(this.o, str);
    }

    public void u0(int i2) {
        v0(this.f782b.getString(i2));
    }

    public Set<String> v(Set<String> set) {
        if (!B0()) {
            return set;
        }
        e w2 = w();
        return w2 != null ? w2.d(this.o, set) : this.f783c.j().getStringSet(this.o, set);
    }

    public void v0(CharSequence charSequence) {
        if (A() != null) {
            throw new IllegalStateException("Preference already has a SummaryProvider set.");
        } else if (!TextUtils.equals(this.l, charSequence)) {
            this.l = charSequence;
            J();
        }
    }

    public e w() {
        e eVar = this.f784d;
        if (eVar != null) {
            return eVar;
        }
        j jVar = this.f783c;
        if (jVar != null) {
            return jVar.h();
        }
        return null;
    }

    public final void w0(g gVar) {
        this.O = gVar;
        J();
    }

    public j x() {
        return this.f783c;
    }

    public void x0(int i2) {
        y0(this.f782b.getString(i2));
    }

    public SharedPreferences y() {
        if (this.f783c == null || w() != null) {
            return null;
        }
        return this.f783c.j();
    }

    public void y0(CharSequence charSequence) {
        if ((charSequence == null && this.k != null) || (charSequence != null && !charSequence.equals(this.k))) {
            this.k = charSequence;
            J();
        }
    }

    public CharSequence z() {
        return A() != null ? A().a(this) : this.l;
    }

    public void z0(int i2) {
        this.I = i2;
    }
}
